package com.ai.manager.edu.cms.info.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ai.dao.edu.cms.info.InfoPublishDetailMapper;
import com.ai.manager.edu.cms.info.InfoPublishDetailManager;
import com.ai.model.edu.cms.info.InfoPublishDetail;
import com.ai.model.edu.cms.info.vo.InfoPublishDetailVO;

@Component("infoPublishDetailManager")
public class InfoPublishDetailManagerImpl implements InfoPublishDetailManager {
	
    @Resource
    private InfoPublishDetailMapper infoPublishDetailMapper;

    /**
     * 根据主键查询记录
     */
    public List<InfoPublishDetailVO> findInfoPublishDetailByAppId(Long id) {
    	return infoPublishDetailMapper.findInfoPublishDetailByAppId(id);
    }
    
    /**
     * 根据主键ID集合查询记录
     */
    public List<InfoPublishDetailVO> findInfoPublishDetailByAppIds(List<Long> ids) {
    	return infoPublishDetailMapper.findInfoPublishDetailByAppIds(ids);
    }

	/* 
	 * 批量新增
	 */
	@Override
	public void batchAddInfoPublishDetail(List<InfoPublishDetail> list) {
		infoPublishDetailMapper.batchAddInfoPublishDetail(list);
	}

	@Override
	public void delInfoPublishDetailByPublishId(Long publishId) {
		infoPublishDetailMapper.delInfoPublishDetailByPublishId(publishId);
	}

    @Override
    public Long updateInfoDetailByInfoId(InfoPublishDetail infoPublishDetail) {
        return infoPublishDetailMapper.updateInfoDetailByInfoId(infoPublishDetail);
    }
}